/*
语法百题 解题报告：
 http://git.oschina.net/et0662/sznoi-grammar/ 
*/
#include<stdio.h>

int main(void)
{
	int n,s,t,total=0,i,leaves;
	scanf("%d%d",&n,&s);
	leaves=0;
	for(i=0;i<n;i++)
	{
		scanf("%d",&t);
		leaves=t+leaves;
		total=total+leaves/s;
		leaves=leaves%s;
	}
	if(leaves>0)
		total++;
	printf("%d\n",total);
	return 0;
}
